package edu.uci.ics.multicast.overlay;

import java.util.LinkedList;
import java.util.List;

public class Path {

	private OverlayNode destinationNode;
	private List<Edge> listEdges = new LinkedList<Edge>();
	
	public Path(OverlayNode destinationNode) {
		this.destinationNode = destinationNode;
	}

	public void setDestinationNode(OverlayNode destinationNode) {
		this.destinationNode = destinationNode;
	}

	public OverlayNode getDestinationNode() {
		return destinationNode;
	}

	public void addEdge(Edge edge) {
		listEdges.add(edge);
	}

	public List<Edge> getListEdges() {
		return listEdges;
	}

	@Override
	public String toString() {
		String strResult = "";
		for (Edge edge : listEdges) {
			strResult += edge.getIndex() + " ";
		}
		return "Path [" + strResult + "]";
	}
	
}
